/*
 * Copyright (C) 2015 Daniel Uppenkamp
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.googlecode.maurersmarbles.states;

import com.googlecode.maurersmarbles.GameState;
import com.googlecode.maurersmarbles.InputEvent;
import com.googlecode.maurersmarbles.Screen;

/**
 *
 * @author Daniel Uppenkamp
 */
public interface State {

    /**
     * Called when the state is entered.
     *
     * @param screen the screen, or null if there is no screen
     * @param gameState the game state
     * @return the state to transition to, or null to stay in the current state
     */
    public State enter(Screen screen, GameState gameState);

    /**
     * Handles the given input event.
     *
     * @param screen the screen, or null if there is no screen
     * @param gameState the game state
     * @param inputEvent the input event
     * @return the state to transition to, or null to stay in the current state
     */
    public State handleInputEvent(Screen screen, GameState gameState, InputEvent inputEvent);

    /**
     * Handles the resize event.
     *
     * @param screen the screen, or null if there is no screen
     * @param gameState the game state
     * @param width the width of the screen (in pixels)
     * @param height the height of the screen (in pixels)
     */
    public void handleResizeEvent(Screen screen, GameState gameState, int width, int height);

}
